js.underas.util.ArrayList = new Class({
		"_indx":0
		,"_matrix":[]
		,"_size":0
		,"initialize":function(p_array_obj){
			//this.parent();
			this._matrix=[];
			this._size=0;
			this._indx=0;
			this.addAll(p_array_obj);
		}
		,"size":function(){
			return this._size;
		}
		,"get":function(p_indx){				
			return this._matrix[p_indx];	
		}
		,"getIndexOf":function(p_criterio){		
			var indexFind = -1;
			var tmpKey = "";

			Object.each(p_criterio, function(value, key){
   				//alert('The ' + key + ' day of the week is ' + value);
   				tmpKey = key;
			});
			for(var x = 0;x<this.size();x++){
				if(this._matrix[x][tmpKey]==p_criterio[tmpKey]){
					indexFind=x;
					break;
				};
			};
			return indexFind;
		}
		,"getAll":function(){				
			return this._matrix;	
		}
		,"add":function(p_obj){
			this._matrix[this._size]=p_obj;
			this._size++;			
		}
		,"set":function(p_obj,p_indx){
			this._matrix[p_indx]=p_obj;			
		}
		,"remove":function(p_indx){
			
		}
		,"removeAll":function(){
			this._size = 0;
			this._matrix = [];
		}
		,"addAll":function(p_array_obj){	
			this.removeAll();
			if(p_array_obj){
				this._size = p_array_obj.length;
				this._matrix = p_array_obj;	
			}else{
				this._size = 0;
				this._matrix = [];	
			};
		}
		,"orderAsc":function(campo){			
			var tmpArray = this._matrix.sort(function() {
				return function(a, b){
					var objectIDA = a[campo];
					var objectIDB = b[campo];
					if (objectIDA === objectIDB) {
							return 0;
					}
					return objectIDA > objectIDB ? 1 : -1;        
				};
			}());			
		}
		,"orderDesc":function(campo){
			var tmpArray = this._matrix.sort(function() {
				return function(a, b){
					var objectIDA = a[campo];
					var objectIDB = b[campo];
					if (objectIDA === objectIDB) {
							return 0;
					}
					return objectIDA > objectIDB ? 1 : -1;        
				};
			}());		
		}				
});





